# encoding: utf-8
from __future__ import absolute_import, unicode_literals
from django.contrib import admin

from apps.wechat.models import User, Contacts


class UserAdmin(admin.ModelAdmin):
    list_display = ('id', 'id_number', 'user_name', 'unit_name', 'phonenumber', 'openid')
    search_fields = ('user_name', 'unit_name')


class ContactsAdmin(admin.ModelAdmin):
    list_display = ('id', 'id_number', 'user_name', 'unit_name', 'mobile')
    search_fields = ('user_name', 'unit_name')


admin.site.unregister(Contacts)
admin.site.register(Contacts, ContactsAdmin)

admin.site.unregister(User)
admin.site.register(User, UserAdmin)
